package Java9_8.Test_2;

import Java9_8.Test_1.Conpany;
import Java9_8.Test_1.Staff;

import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        Java9_8.Test_1.Conpany c=new Conpany("香岛","临泉路888","88888888","食品");
        System.out.println(c.toString());
        while (true){
            System.out.println("招聘员工请按1，查看员工信息请按2，辞退员工请按3，统计公司人数请按4，查看薪水最高员工请按5");
            int a=in.nextInt();
            switch (a){
                case 1:
                    System.out.println("请输入员工信息");
                    String b=in.next();
                    c.add(new Java9_8.Test_1.Staff(in.next(),in.nextInt(),in.next(),in.next(),in.nextDouble(),in.next()));
                    break;
                case 2:
                    c.show();
                    break;
                case 3:
                    System.out.println("请输入要删除的员工信息");
                    String d=in.next();
                    c.delete(new Staff(in.next(),in.nextInt(),in.next(),in.next(),in.nextDouble(),in.next()));
                    break;
                case 4:
                    c.rs();
                    break;
                case 5:
                    Staff max = c.max();
                    System.out.println(max);
                    break;
            }
        }
    }
}
